package org.grow.mybatisgo.service;

import org.grow.mybatisgo.dao.StudentScoreDao;
import org.grow.mybatisgo.entity.DealBill;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class DealService {
    @Autowired
    private StudentScoreDao studentScoreDao;
    @Transactional()
    public boolean txDeal(DealBill dealBill, Float supplierOnlineScore, Float consumerOnlineScore){
        studentScoreDao.updateScoreByName(supplierOnlineScore,dealBill.getSupplierName());
        studentScoreDao.updateScoreByName(consumerOnlineScore,dealBill.getConsumerName());

        return true;

    }

}
